home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-05-01 | 3.1 KB | 122 lines | [TEXT/MPS ] |
- {
- File: RTCPlugin.p
-
- Contains: System interface for RTC plugins
-
- Version: Technology: System 8
- Release: Universal Interfaces 3.0d3 on Copland DR1
-
- Copyright: © 1984-1996 by Apple Computer, Inc. All rights reserved.
-
- Bugs?: If you find a problem with this file, send the file and version
- information (from above) and the problem description to:
-
- Internet: apple.bugs@applelink.apple.com
- AppleLink: APPLE.BUGS
-
- }
- {$IFC UNDEFINED UsingIncludes}
- {$SETC UsingIncludes := 0}
- {$ENDC}
-
- {$IFC NOT UsingIncludes}
- UNIT RTCPlugin;
- INTERFACE
- {$ENDC}
-
- {$IFC UNDEFINED __RTCPLUGIN__}
- {$SETC __RTCPLUGIN__ := 1}
-
- {$I+}
- {$SETC RTCPluginIncludes := UsingIncludes}
- {$SETC UsingIncludes := 1}
-
- {$IFC UNDEFINED __TYPES__}
- {$I Types.p}
- {$ENDC}
- {$IFC FOR_SYSTEM8_PREEMPTIVE }
- {$IFC UNDEFINED __TIMING__}
- {$I Timing.p}
- {$ENDC}
- {$ENDC}
-
- {$PUSH}
- {$ALIGN MAC68K}
- {$LibExport+}
-
- {$IFC FOR_SYSTEM8_PREEMPTIVE }
- {
- ≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈
- status codes
- ≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈
- }
-
- CONST
- kRTCPluginVersionOne = $01;
- kRTCPluginCurrentVersion = $01;
-
- kRTCNoError = 0;
- kRTCTimeout = 1;
- kRTCUnexpectedError = 2;
- kRTCMemoryError = 3;
- kRTCParameterError = 4;
- kRTCDeviceError = 5;
- kRTCUnexpectedDeviceRequest = 6;
- kRTCControllerError = 7;
- kRTCConsistencyCheckError = 8;
-
- {
- ≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈
- Plugin Calls Provided by the Plugin
- ≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈
- All plugin calls are async.
- The plugin starts the i/o and returns immediately.
- The plugin ISR calls RTCFamRequestComplete() when
- the i/o is completed (see below).
- }
-
- TYPE
- RTCPluginHWVerifyPtr = ProcPtr; { FUNCTION RTCPluginHWVerifyPtr: OSStatus; C; }
-
- RTCPluginInitPtr = ProcPtr; { FUNCTION RTCPluginInitPtr: OSStatus; C; }
-
- RTCPluginTermPtr = ProcPtr; { FUNCTION RTCPluginTermPtr: OSStatus; C; }
-
- RTCPluginSetPtr = ProcPtr; { FUNCTION RTCPluginSetPtr(newTime: Nanoseconds): OSStatus; C; }
-
- RTCPluginGetPtr = ProcPtr; { FUNCTION RTCPluginGetPtr(VAR currentTime: Nanoseconds): OSStatus; C; }
-
- RTCPluginDispatchTablePtr = ^RTCPluginDispatchTable;
- RTCPluginDispatchTable = RECORD
- version: UInt32;
- reserved: ARRAY [0..2] OF UInt32;
- Verify: RTCPluginHWVerifyPtr;
- Init: RTCPluginInitPtr;
- Term: RTCPluginTermPtr;
- Read: RTCPluginGetPtr;
- Write: RTCPluginSetPtr;
- END;
-
- FUNCTION RTCPluginHWVerify: OSStatus; C;
- FUNCTION RTCPluginInit: OSStatus; C;
- FUNCTION RTCPluginTerm: OSStatus; C;
- FUNCTION RTCPluginSet(newTime: Nanoseconds): OSStatus; C;
- FUNCTION RTCPluginGet(VAR currentTime: Nanoseconds): OSStatus; C;
- {
- ≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈
- Plugin Calls Provided by the Family
- ≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈
- }
- PROCEDURE RTCFamRequestComplete(status: OSStatus); C;
- {$ENDC}
- {$ALIGN RESET}
- {$POP}
-
- {$SETC UsingIncludes := RTCPluginIncludes}
-
- {$ENDC} {__RTCPLUGIN__}
-
- {$IFC NOT UsingIncludes}
- END.
- {$ENDC}
-